#include <glib/g2/polyline.h>
#include <glib/g2/curve.h>
#include <glib/g2/algorithm.h>

namespace g2 {

polyline::polyline()
{
}

polyline::polyline(const std::vector<g2::vector> & v) :
	std::vector<g2::vector>(v)
{
}

polyline polyline::flatten(double h) const
{
	return * this;
}

g2::vector polyline::center() const
{
	return g2::vector(0, 0);
}

box polyline::bounds() const
{
	return box();
}

void polyline::translate(const g2::vector &)
{
}

void polyline::rotate(const g2::vector & center, double angle)
{
}

bool polyline::on(const g2::vector & v, double h) const
{
	polyline::const_iterator it;
	double c;
	return fabs(projection(v, begin(), end(), it, c)) < h;
}

} // g2
